//
//  SYCollectionViewLayout.h
//  SYCollectionviewTest
//
//  Created by apple on 2019/1/2.
//  Copyright © 2019 ZMX. All rights reserved.
//

#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSInteger, SYLayoutCollectionViewScrollDirection) {
    SYLayoutCollectionViewScrollDirectionVertical,
    SYLayoutCollectionViewScrollDirectionHorizontal
};


@protocol SYFormCollectionViewDelegateLayout <UICollectionViewDelegate>
@optional

- (CGSize)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath;

- (UIEdgeInsets)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section;
/***  行间距  */
- (CGFloat)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section;

/***  最小的列间距  */
- (CGFloat)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section;



- (CGSize)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section;

- (CGSize)SYCollectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section;

@end


@interface SYFormCollectionViewLayout : UICollectionViewLayout
/**      **/
@property(nonatomic, assign) id<SYFormCollectionViewDelegateLayout> SYCollectionViewDelegateLayout;
/**   排版方向
 SYLayoutCollectionViewScrollDirectionVertical  纵向
 SYLayoutCollectionViewScrollDirectionHorizontal 横向
 **/
@property(nonatomic, assign) SYLayoutCollectionViewScrollDirection scrollDirection;

/**   内容尺寸  */
@property (nonatomic, assign) CGSize contentLayoutSize;
/**   item大小  */
@property (nonatomic, assign) CGSize itemSize;
/**   cell与cell之间的距离  */
@property (nonatomic, assign) CGFloat interItemSpacing;
/**   一行cell与一行cell之间的距离   */
@property (nonatomic, assign) CGFloat lineSpacing;

@property (nonatomic, assign) UIEdgeInsets contentEdgeInset;


//默认为64.0, default is 64.0
@property (nonatomic, assign) CGFloat naviHeight;
/**      **/
@property(nonatomic, strong) NSIndexPath *shieldIndexPath;

@end

NS_ASSUME_NONNULL_END
